<volist name="list" id="tf">
    <div class="square-red single-row source">
        <label for="source-{$i}">
            <input class="input" type="radio" name="taskform" value="{$tf.id}"  />
            {$tf.name}
        </label>
    </div>
</volist>
<script>
//当表单的选项被点击的时候
$('#recentForm label').click(function(e) {
    $('#addTo').css('display','block');
	$.get('<?php echo U('Taskform/getnewform'); ?>',{id:$(this).find('input').val()},function(data){
		//将获取到的表单插入页面中
		$('#myform').html(data.tbody);
		$("#f-form form").append('<input type="hidden" name="access" value="Integral_log"/>');
		
		//当每次重新获取表单的时候都重新开启表单验证
		$("#f-form form").Validform({
			ajaxPost:true,
			tiptype:function(msg, s, data){
				if(s.type == 1){
					$.ThinkBox.success('正在处理，请稍等……',{'delayClose':0,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
				}
				if(s.type == 3){
				$.ThinkBox.error(msg,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
			}
			},
			datatype:{
				"text":function(gets,obj,curform,regxp){
					return true;
				},"image":function(gets,obj,curform,regxp){
					return true;
				}
			},
			callback:function(data){
				//检测登录 
				$('.ThinkBox-close').trigger('click');
				if(data.status == 0){
					$.ThinkBox.error(data.info,{'delayClose':200}); 
				}else{
					$.ThinkBox.success(data.info,{'delayClose':500,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
					$('#ajaxlistboxform').submit();
					//更新列表
					$("#myform form")[0].reset();
				}
			}
		});
	},'json');
});
</script>